Allow usage of vario temperature also in TEST2 and TEST3
[openXsensor.git] / oXs_Configurator / Python 37 Sources / oxsVario.py
blob23f2bb9d74d865ddd0a0700bca48b8f63a874b00
1 from oxsConfig import ttk , W , E , Spinbox , fVario , varioTypeVar , secondBaroExist , varioSourceVar , varioHysteresisVar
2 from oxsConfig import analogVarioChanged , fAnalogVario , analogVarioExist , varioAnalogPinVar , varioAnalogMaxVar , varioAnalogMinVar
4 #here start the definition of the vario tab
5 ttk.Label(fVario, text="Type of sensor").grid(row=1, pady=(20,2))
6 varioTypeBox = ttk.Combobox(fVario, textvariable=varioTypeVar,
7 values=('MS5611', "GY86" , "BMP085" , "BMP180" , "GY87", "BMP280"),
8 state="readonly")
9 #varioBox.bind('<<ComboboxSelected>>', varioChanged)
10 #protocolBox['state']='readonly'
11 varioTypeBox.grid(row=2, padx=10)
12 ttk.Checkbutton(fVario, text='a MS5611 is added as second sensor', variable=secondBaroExist,
13 onvalue='On', offvalue='Off').grid(row=3, sticky=(W,E), padx=20 , pady=(20,2))
15 ttk.Label(fVario, text="Source of Vspeed field").grid(row=4, pady=(20,2))
16 varioSourceBox = ttk.Combobox(fVario, textvariable=varioSourceVar,
17 values=('FIRST_BARO', 'BARO_AND_IMU', 'SECOND_BARO' , 'AVERAGE_FIRST_SECOND', 'AIRSPEED_COMPENSATED' , 'PPM_SELECTION'),
18 state="readonly")
19 #varioBox.bind('<<ComboboxSelected>>', varioChanged)
20 #protocolBox['state']='readonly'
21 varioSourceBox.grid(row=5, padx=10)
23 ttk.Label(fVario, text="Hysteresis" ).grid(column= 0, row=6, padx= 5 , pady=(20,2))
24 varioHysteresisBox = Spinbox(fVario, from_=0.0, to=10.0, width = 5 , textvariable=varioHysteresisVar)
25 varioHysteresisBox.grid(column=1, row=6 , padx=10, pady=(20,2))
29 #def analogVarioChanged():
30 # if analogVarioExist.get() == 'On':
31 # fAnalogVario.grid(row=8)
32 # else:
33 # fAnalogVario.grid_remove()
34 ttk.Checkbutton(fVario, text='Generate an analog Vspeed signal', command= analogVarioChanged, variable=analogVarioExist,
35 onvalue='On', offvalue='Off').grid(row=7, sticky=(W,E), padx=20 , pady=(20,2))
36 ttk.Label(fAnalogVario, text="Pin" ).grid(column= 0, row=0, padx= 5 )
38 varioAnalogPinBox = ttk.Combobox(fAnalogVario, textvariable=varioAnalogPinVar,
39 values=('3', '11') , width=3)
40 varioAnalogPinBox.grid(column=1, row=0, padx=10)
41 ttk.Label(fAnalogVario, text="Min VSpeed" ).grid(column= 0, row=1, padx= 5 )
42 varioAnalogMinBox = Spinbox(fAnalogVario, from_=-10.0, to=0.0, textvariable=varioAnalogMinVar ,
43 increment='0.5', width=4)
44 varioAnalogMinBox.grid(column=1, row=1 , padx=10)
45 ttk.Label(fAnalogVario, text="Max VSpeed" ).grid(column= 0, row=2, padx= 5 )
46 varioAnalogMaxBox = Spinbox(fAnalogVario, from_=0.0, to=10.0, textvariable=varioAnalogMaxVar,
47 increment = '0.5', width=4)
48 varioAnalogMaxBox.grid(column=1, row=2 , padx=10)